<!--[if IE]>
	<style type="text/css" media="all">.borderitem {border-style: solid;}</style>
	<![endif]-->

<?php
$this->breadcrumbs=array(
	Reader::MENU_NAME=>array('index'),
	$model->name,
);

$this->menu=array(
	array('label'=>Reader::MENU_BROWSE, 'url'=>array('index')),
	array('label'=>Reader::MENU_CREAT, 'url'=>array('create')),
	array('label'=>Reader::MENU_UPDATE, 'url'=>array('update', 'id'=>$model->readerID)),
	array('label'=>Reader::MENU_DEL, 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->readerID),'confirm'=>'确认删除读者信息吗?')),
	array('label'=>Reader::MENU_ADMIN, 'url'=>array('admin')),
);
?>

<h1>查看读者详细信息，编号：<?php echo CHtml::label($model->readerID,false,array('id'=>'_reader_id')); ?></h1>


<?php 

$this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'readerID',
		'name',
		'sex',
		'IDType',
		'IDNum',
		'phoneNum',
		'address',
		'balance',
		'photoPath',
	),
)); 

?>


<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
    'id'=>'mydialog',
    // additional javascript options for the dialog plugin
    'options'=>array(
        'title'=>'充值',
        'autoOpen'=>false,
    ),
));

    echo 'dialog content here';
    
    
echo CHtml::label('人民币:',false);
echo CHtml::textField('数量','0',array('id'=>'money_num'));

echo CHtml::ajaxlink('确定充值',array('AddMoney'),array(
		'datatype'=>'json',
		'data'=>'js:{id:$("#_reader_id").val(),money:$("#money_num").attr("value")}',
		'cache'=>false,
		'success'=>'js:function(data){$(".news-list").html(eval(data));}'
		));
echo "<br/>";
$this->endWidget('zii.widgets.jui.CJuiDialog');



// 提供打开充值窗口的连接
echo CHtml::link('充值', '#', array(
   'onclick'=>'$("#mydialog").dialog("open"); return false;',
));
?>
